package com.ss.android.article.share.d;

import android.content.Context;
import android.content.Intent;
import android.text.TextUtils;
import com.ss.android.article.share.e.c;
import com.ss.android.article.share.entity.BaseShareContent;

public final class g extends c {
    private Context a;

    public g(Context arg1) {

        this.a = arg1;
    }

    public final boolean a(BaseShareContent arg6) {
        int v4 = 268435456;
        boolean v0 = false;
        if(!TextUtils.isEmpty(arg6.getText())) {
            Intent v1 = new Intent("android.intent.action.SEND");
            v1.setFlags(v4);
            v1.setType("text/plain");
            if(!TextUtils.isEmpty(arg6.getTitle())) {
                v1.putExtra("android.intent.extra.SUBJECT", arg6.getTitle());
            }

            v1.putExtra("android.intent.extra.TEXT", arg6.getText());
            v1 = Intent.createChooser(v1, this.a.getString(com.ss.android.article.browser.R.string.ch));
            v1.setFlags(v4);
            try {
                this.a.startActivity(v1);
                v0 = true;
            }
            catch(Exception v1_1) {
            }
        }

        return v0;
    }
}

